<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增请假')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-outside-add">
        <div class="form-group">
            <label class="col-sm-2 control-label">姓名：</label>
            <div class="col-sm-2">
                <input name="sysUserName" class="form-control" type="text" th:value="${user.userName}" readonly>
            </div>
            <label class="col-sm-2 control-label">部门：</label>
            <div class="col-sm-2">
                <input name="sysUserName" class="form-control" type="text" th:value="${dept.deptName}" readonly>
            </div>
            <label class="col-sm-2 control-label">岗位：</label>
            <div class="col-sm-2">
                <input name="job" class="form-control" type="text" >
            </div>
            <input name="sysUserid" style="display: none" class="form-control" type="text" th:value="${user.userId}" readonly>
            <input name="sysDeptid" style="display: none" class="form-control" type="text" th:value="${user.deptId}" readonly>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否有工作计划：</label>
            <div class="col-sm-3">
                <label class="radio-box">
                    <input type="radio" checked="" value="0" id="optionsRadios1" name="planeFlag" >否</label>
                <label class="radio-box">
                    <input type="radio" value="1" id="optionsRadios2" name="planeFlag">是</label>
            </div>
            <label class="col-sm-3 control-label">是否通过审批：</label>
            <div class="col-sm-3">
                <label class="radio-box">
                    <input type="radio" checked="" value="0" id="optionsRadios3" name="agreeFlag">否</label>
                <label class="radio-box">
                    <input type="radio" value="1" id="optionsRadios4" name="agreeFlag">是</label>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">预计出发时间：</label>
            <div class="col-sm-3">
                <div class="input-group date">
                    <input name="departureTime" class="time-input" placeholder="yyyy-MM-dd " type="text">
<!--                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                </div>
            </div>

            <label class="col-sm-3 control-label">预计返回时间：</label>
            <div class="col-sm-3">
                <div class="input-group date">
                    <input name="returnTime" class="time-input" placeholder="yyyy-MM-dd " type="text">
<!--                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">出差性质：</label>
            <div class="col-sm-8">
                <select class="form-control" name="evectionType">
                    <option value="" selected>请选择</option>
                    <option value="陌拜">陌拜</option>
                    <option value="回访">回访</option>
                    <option value="立项">立项</option>
                    <option value="签单">签单</option>
                    <option value="其他">其他</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">出发地：</label>
            <div class="col-sm-3">
                <input type="text" name="departurePlace" class="form-control" placeholder="请输入出发地"></input>
            </div>
            <label class="col-sm-3 control-label">&nbsp;目的地：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
            <div class="col-sm-3">
                <input type="text" name="destinationPlace" class="form-control" placeholder="请输入目的地"></input>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">出差计划：</label>
            <div class="col-sm-8">
                <textarea type="text" name="evectionProject" class="form-control" placeholder="出差计划"></textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">出差目的：</label>
            <div class="col-sm-8">
                <textarea type="text" name="evectionTarget" class="form-control" placeholder="出差目的"></textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">交通工具：</label>
            <div class="col-sm-8">
                <select class="form-control" name="transportation">
                    <option value="" selected>请选择</option>
                    <option value="飞机">飞机</option>
                    <option value="高铁">高铁</option>
                    <option value="火车">火车</option>
                    <option value="客车">客车</option>
                    <option value="自驾">自驾</option>
                    <option value="其他">其他</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">同行人员：</label>
            <div class="col-sm-8">
                <select class="form-control" name="togetherMan">
                    <option value="" selected>请选择</option>
                    <option value="售前工程师">售前工程师</option>
                    <option value="主管领导">主管领导</option>
                    <option value="同事">同事</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">申请人：</label>
            <div class="col-sm-8">
                <input name="fromMan" class="form-control" type="text" th:value="${user.userName}" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-3 control-label">部门主管：</label>
            <div class="col-xs-8">
                <select id="post" class="form-control" name="deptLeader">
                    <option value="" selected>请选择</option>
                    <option th:each="ul:${userlist}" th:value="${ul.loginName}" th:text="${ul.userName}" th:disabled="${ul.status == '1'}"></option>
                </select>
            </div>
        </div>
    </form>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    var prefix = ctx + "outside"
    $("#form-leaveapply-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-outside-add').serialize());
        }
    }

    $("input[name='startTime']").datetimepicker({
        format: "yyyy-mm-dd hh:ii:ss",
        autoclose: true
    });

    $("input[name='endTime']").datetimepicker({
        format: "yyyy-mm-dd hh:ii:ss",
        autoclose: true
    });

</script>
</body>
</html>